LuaPackagePath "/var/www/sailor_framework/src/?.lua"
<FilesMatch "\.lua$">
AddHandler lua-script .lua
</FilesMatch>

DirectoryIndex index.lua

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f


#CATEGORY SORTING WITH PAGINATION
RewriteRule ^([^/]+)/([0-9]+)/?$ /index.lua?r=main&c=$1&p=$2 [L]

#INSIDE A POST
RewriteRule ^([^/]+)/([^./]+)/?$ /index.lua?r=main/post&c=$1&t=$2 [L]

#ABOUT PAGE
RewriteRule ^about[/]?$ /index.lua?r=main/about [L]

#ARCHIVE PAGE
RewriteRule ^archive[/]?$ /index.lua?r=main/archive [L]

#MAIN PAGE WITH PAGINATION
RewriteRule ^([0-9]+)/?$ /index.lua?r=main&p=$1 [L]

#CATEGORY SORTING
RewriteRule ^([^./]+)/?$ /index.lua?r=main&c=$1 [L]
